package com.darrenchan.course04

object AbstractApp {
  def main(args: Array[String]): Unit = {
    val p = new Studentp()
    p.speak
    println(p.name + ":" + p.age)
  }
}

/**
  * 类一个或多个方法没有完整实现（只有定义，没有实现）
  */
abstract class Personp {
  def speak()

  val name: String
  val age: Int
}

class Studentp extends Personp {
  override def speak(): Unit = {
    println("speak...")
  }

  override val name: String = "陈驰"
  override val age: Int = 25
}
